# @Time:2023/4/25 17:01
# -*- coding: UTF-8 -*-

from rest_framework import serializers
from user.models import User, Addr


#用户序列化器
class UserSerializer(serializers.ModelSerializer):
    class Meta:
        model=User
        fields=['id','username','mobile','email','avatar','last_name']

#收货地址序列化器
class AddrSerializer(serializers.ModelSerializer):
    class Meta:
        model = Addr
        fields ='__all__'
